<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" isELIgnored="false"
    pageEncoding="UTF-8"%>
<%@ include file="../include/common.jsp" %>
<link href="../css/common.css" rel="stylesheet" type="text/css" />    
<link rel="stylesheet" type="text/css" href="../dhtmlx/dhtmlxMenu/codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../dhtmlx/dhtmlxMenu/codebase/dhtmlxcommon.js"></script>
<script src="../dhtmlx/dhtmlxMenu/codebase/dhtmlxmenu.js"></script>
<script src="../dhtmlx/dhtmlxMenu/codebase/ext/dhtmlxmenu_ext.js" type="text/javascript"></script>

<script>
var menu;
var toolbar;
function initMenu(u_auth) {
	menu = new dhtmlXMenuObject("menuObj");
    menu.setIconsPath("");
    menu.setSkin("dhx_skyblue");
    //menu.loadXML("../include/top_menu.jsp?u_auth=<%=u_auth%>");
    if(u_auth==1){
    	menu.loadXML("../include/top_menu.xml");
    }else if(u_auth==2){
    	menu.loadXML("../include/top_menu2.xml");
    }else{
    	menu.loadXML("../include/top_menu3.xml");
    }
}
</script>
<style type="text/css">
<!--
img{
 	border:0px;
}
td.tab_mid{
	padding:0px 20px;
}
-->
</style>
<div style="height: 20px; "><div id="menuObj" style="border :1px solid Silver;"></div></div>
<div style="height: 60px;padding:10px 10px 0px 10px; background-color:#E1E7EE; border :1px solid Silver;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td>
		<table border="0" cellpadding="0" cellspacing="0">
			<tr style="padding:0px 5px 0px 5px;text-align:center">
				<td style="padding-left:10px" ><a href="../insa/main.jsp"><img src='../images/button/Home.png' width="38px" height="38px"></a></td>
				<td class="tab_mid"><img src='../images/tab_middle.gif'></td>
				<td><a href="../insa/viewinfo.do"><img src='../images/button/Paste.png'width="38px" height="38px"></a></td>
				<c:if test="${u_auth <= 2}">
				<td class="tab_mid"><img src='../images/tab_middle.gif'></td>
				<td><a href="../insa/register.jsp"><img src='../images/button/User.png'width="38px" height="38px"></a></td>
				</c:if>
				<c:if test="${u_auth <= 2}">
				<td class="tab_mid"><img src='../images/tab_middle.gif'></td>
				<td><a href="../insa/listing.jsp"><img src='../images/button/Search.png' width="38px" height="38px"></a></td>
				</c:if>
				<c:if test="${u_auth <= 2}">
				<td class="tab_mid"><img src='../images/tab_middle.gif'></td>
				<td><a href="../department/listing.do"><img src='../images/button/Template.png' width="38px" height="38px"></a></td>
				</c:if>
				<c:if test="${u_auth <= 2}">
				<td class="tab_mid"><img src='../images/tab_middle.gif'></td>
				<td><a href="../official_order/officialordermodify.do"><img src='../images/button/Portfolio.png' width="38px" height="38px"></a></td>
				</c:if>
				<c:if test="${u_auth <= 1}">
				<td class="tab_mid"><img src='../images/tab_middle.gif'></td>
				<td><a href="../admin/admin_main.jsp"><img src='../images/button/Tools.png' width="38px" height="38px"></a></td>
				</c:if>
				<td class="tab_mid"><img src='../images/tab_middle.gif'></td>
				<td><a href="../main/logout.jsp"><img src='../images/button/Close.png' width="38px" height="38px"></a></td>
			</tr>
			<tr>
				<td height="26" style="padding-left:10px">홈으로</td>
				<td></td>
				<td>내정보</td>
				<c:if test="${u_auth <= 2}">
				<td></td>
				<td>사원등록</td>
				</c:if>
				<c:if test="${u_auth <= 2}">
				<td></td>
				<td>사원조회</td>
				</c:if>
				<c:if test="${u_auth <= 2}">
				<td></td>
				<td>조직조회</td>
				</c:if>
				<c:if test="${u_auth <= 2}">
				<td></td>
				<td>발령조회</td>
				</c:if>
				<c:if test="${u_auth <= 1}">
				<td></td>
				<td>권한관리</td>
				</c:if>
				<td></td>
				<td>로그아웃</td>
			</tr>
		</table>
		</td>
		<td align="right" valign="top">
		<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td width="30% " valign="top" align="right"><b><%=u_name %> (${u_auth_name})</B>님 안녕하세요</td>
			</tr>
		</table>
		</td>
	</tr>
</table>
</div>
<div style="height: 10px;"></div>


<script>
initMenu(<%=u_auth%>);
</script>
		